Imports OMANE.Common.UI
Imports Microsoft.Practices.Prism.Commands


Public Class StateBarTemplateSelector
    Inherits DataTemplateSelector

    Public Overrides Function SelectTemplate(ByVal item As Object, ByVal container As System.Windows.DependencyObject) As System.Windows.DataTemplate
        If item Is Nothing Then Return Nothing
        Dim statebarsection As ViewModelStatusBarSection = item
        Dim template As DataTemplate = Application.Current.Resources(statebarsection.Template)
        If template Is Nothing Then Return Nothing
        Return template
    End Function
End Class